
<?php
/**
 * tydny View for Ohlasky Component
 * @license		GNU/GPL
 */

// No direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

jimport( 'joomla.application.component.view' );

/**
 * tydny View
 *
 */
class OhlaskysViewTydny extends JView
{
	/**
	 * display method of tydny view
	 * @return void
	 **/
	function display($tpl = null)
	{
		//get the tydny
		$tydny		=& $this->get('Data');
		$isNew		= ($tydny->id < 1);

        
		$text = $isNew ? JText::_('New') : JText::_( 'Edit' );
		JToolBarHelper::title(   JText::_('Týden ohlášek').': <small><small>['.$text.']</small></small>' );
		JToolBarHelper::save();
		if ($isNew)  {
			JToolBarHelper::cancel();
		} else {
			// for existing items the button is renamed `close`
            JToolBarHelper::deleteList();
			JToolBarHelper::cancel( 'cancel', 'Close' );
		}

		$this->assignRef('tydny',	$tydny);

		parent::display($tpl);
	}
}

